package com.jx.web.controller;

import com.jx.model.User;
import com.jx.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping("/login")
    @ResponseBody
    public String login(){
        return "user/login";
    }

    @RequestMapping("/find")
    @ResponseBody
    public User find(Integer id){
        return userService.findById(id);
    }

}
